import type { App } from 'vue'
import VChart from 'vue-echarts'
import { use } from 'echarts/core'
import { CanvasRenderer } from 'echarts/renderers'
import { PieChart, LineChart } from 'echarts/charts'
import { LegendComponent, TooltipComponent, DataZoomComponent, TitleComponent, GridComponent } from 'echarts/components'

use([CanvasRenderer, PieChart, TitleComponent, TooltipComponent, DataZoomComponent, LegendComponent, LineChart, GridComponent])

export function setupEcharts(app: App) {
  app.component('VChart', VChart)
}
